package com.apes.scm.masterdata.product.es;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;

@Data
@Document(indexName = "product")
public class EsProduct {

    @Id
    private String id;

    @Field(store = true, type = FieldType.Text)
    private String tags;

    @Field(store = true, type = FieldType.Text)
    private String name;

    @Field(store = true, type = FieldType.Text)
    private String initials; //拼音首字母

    @Field(store = true, type = FieldType.Boolean)
    private boolean valid;

    @Field(store = true, type = FieldType.Text)
    private String productGroupId;

    @Field(store = true, type = FieldType.Boolean)
    private boolean productGroupQtyMgmt;

    @Field(store = true, type = FieldType.Text)
    private String brandId;

    @Field(store = true, type = FieldType.Text)
    private String classifyId;

    @Field(store = true, type = FieldType.Text)
    private String state;
}
